﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using ShineTech.Domain.Models.Users;

namespace ShineTech.Infrastructure.Repositories.Users
{
    public class UserEntityTypeConfiguration : IEntityTypeConfiguration<User>
    {
        public void Configure(EntityTypeBuilder<User> builder)
        {
            builder.ToTable("Users");

            builder.HasKey(t => t.Id);
            builder.Property(t => t.Name).HasColumnName("Name").IsRequired();
            builder.Property(t => t.Phone).HasColumnName("Phone").IsRequired();
            builder.Property(t => t.Email).HasColumnName("Email").IsRequired();

            


        }
    }
}
